package Groep1;

import java.util.ArrayList;

/**
 * @author Roy Esselink
 *
 */
public class mailMessage {

	private String Sender;
	private ArrayList<String> Reciptien = new ArrayList<String>();
	private String Body = "";
	private String Helo;
	private String Subject ="";
	

	/**
	 * 
	 */
	public mailMessage(){
		
	}
	
	public mailMessage(String Helo){
		this.Helo = Helo;
	}
	
	public void Send(String server){
		try {
			SmtpTalk send = new SmtpTalk(server);
			send.converse(this.Sender, this.Reciptien.get(0), this.Subject, this.Body);
		} catch (Exception e) {
			e.printStackTrace();
		}
	}
	
	/**
	 * 
	 * @return
	 */
	public String getSubject() {
		return Subject;
	}

	/**
	 * 
	 * @param subject
	 */
	public void setSubject(String subject) {
		this.Subject = subject;
	}

	/**
	 * 
	 * @return
	 */
	public String getSender() {
		return Sender;
	}

	/**
	 * 
	 * @param sender
	 */
	public void setSender(String sender) {
		this.Sender = sender;
	}

	/**
	 * 
	 * @return
	 */
	public ArrayList<String> getReciptien() {
		return Reciptien;
	}

	/**
	 * 
	 * @param reciptien
	 */
	public void setReciptien(String reciptien) {
		this.Reciptien.add(reciptien);
	}

	/**
	 * 
	 * @return
	 */
	public String getBody() {
		return Body;
	}

	/**
	 * 
	 * @param body
	 */
	public void setBody(String body) {
		this.Body += "\n"+body;
	}

	/**
	 * 
	 * @return
	 */
	public String getHelo() {
		return Helo;
	}
}
